import { Provide, Schedule } from "@midwayjs/decorator";
import { CommonSchedule } from "midway";

@Provide()
@Schedule({
  interval: '0 0 0 ? * L',    // 每周天凌晨执行一次
  type: 'worker',
  env: ['production']
})
export class MyResolver implements CommonSchedule {
  async exec() {
    console.log("这是个定时任务。。。")
  }
}